﻿#ifndef TLVCMDPANEL_H
#define TLVCMDPANEL_H

#include <QWidget>
#include "IICTableWidget.h"
#include "TlvTableWidget.h"
#include "stores/TlvProject/TlvDataModelTypeDef.h"

namespace Ui {
class TlvCmdPanel;
}

class TlvCmdPanel : public QWidget
{
    Q_OBJECT

public:
    explicit TlvCmdPanel(QWidget *parent = nullptr);
    ~TlvCmdPanel();

    void setTitle(const QString& title);

    IICTableWidget* iicTable();
    TlvTableWidget* tlvTable();

    CmdPageModel toCmdPageModel();

private slots:
    void handleSendSelected(bool isIIC);

    void onTaskDone();

    void on_btnIICSendSelected_clicked();

    void on_btnIICAddRow_clicked();

    void on_btnIICDeleteRows_clicked();

    void on_btnTlvSendSelected_clicked();

    void on_btnTLVAddRow_clicked();

    void on_btnTLVDeleteRows_clicked();

private:
    Ui::TlvCmdPanel *ui;
    QString m_title;
};

#endif // TLVCMDPANEL_H
